package com.china.produce.scheduled;

import cn.hutool.core.date.DateUtil;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @ClassName
 * @Author niujie
 * @Version
 * @Description
 * @CreateTime 2023/3/9
 */
@Component
public class TaskScheduled {

    @Scheduled(cron = "0 0/1 * * * ?")
    public void test() {
        System.out.println(Thread.currentThread().getName());
        System.out.println(DateUtil.now());
    }
}
